home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / udev / rules.d / 65-dmsetup.rules < prev    next >
Text File  |  2008-10-20  |  1KB  |  34 lines

  1. SUBSYSTEM!="block",                GOTO="device_mapper_end"
  2. KERNEL!="dm-*",                    GOTO="device_mapper_end"
  3. ACTION!="add|change",                GOTO="device_mapper_end"
  4.  
  5. # Obtain device status
  6. IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
  7. ENV{DM_NAME}!="?*",                GOTO="device_mapper_end"
  8.  
  9. # these are temporary devices created by cryptsetup, we want to ignore them
  10. # and also hide them from HAL
  11. ENV{DM_NAME}=="temporary-cryptsetup-*",        OPTIONS="ignore_device"
  12.  
  13. # Make the device take the /dev/mapper name
  14. OPTIONS+="string_escape=none", NAME="mapper/$env{DM_NAME}"
  15. SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
  16. ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
  17.  
  18. ENV{DM_STATE}=="SUSPENDED",            GOTO="device_mapper_end"
  19. ENV{DM_TARGET_TYPES}=="|*error*",        GOTO="device_mapper_end"
  20.  
  21. # by-uuid and by-label symlinks
  22. IMPORT{program}="vol_id --export $tempnode"
  23.  
  24. OPTIONS+="link_priority=-100"
  25. ENV{DM_UUID}=="DMRAID-*", OPTIONS="link_priority=100"
  26. ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
  27.  
  28. ENV{ID_FS_UUID_ENC}=="?*",    ENV{ID_FS_USAGE}=="filesystem|other|crypto", \
  29.     SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
  30. ENV{ID_FS_LABEL_ENC}=="?*",    ENV{ID_FS_USAGE}=="filesystem|other", \
  31.     SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
  32.  
  33. LABEL="device_mapper_end"
  34.